{foreach $data.options as $value => $title}
<input type="checkbox"
    {foreach $data.attrs as $attr => $val}
    {if $attr == 'id'}
    id="{$val}_{$value}"
    {/if}

    {if $attr != 'value'}
    {$attr}="{$val}"
    {/if}
    {/foreach}
    value="{$value}"

    {if $data.is_title}title="{$title}"{/if}

    {if isset($data.attrs.value) && in_array($value, $data.attrs.value)}checked{/if}
>
{if !$data.is_title}
{$title}
{/if}
{/foreach}